package com.ruoyi.web.exception;

/**
 * @Description:
 * @Date:Create in 2021/7/23 14:31
 * @Modified By:
 */
public enum CommonEnum implements BaseErrorInfoInterface {
    // 数据操作错误定义
    SUCCESS(200, "操作成功"),
    FAIL(-1, "操作失败"),
    BODY_NOT_MATCH(400, "请求的数据格式不符"),
    CREATE_USER_ERROR(400, "创建人不可为空"),
    UPDATE_USER_ERROR(400, "更新人不可为空"),
    NOT_FOUND(404, "未找到该资源"),
    INTERNAL_SERVER_ERROR(500, "服务器内部错误"),
    SERVER_BUSY(503, "服务器正忙，请稍后再试"),
    HAS_IMPRESSION_INFO_ERROR(10000, "存在敏感词信息"),
    NOT_FOUND_MGCK(404, "未找到敏感词库资源文件"),
    ENTITY_SAME_DATA(404, "已存在相同数据"),
    NOT_ACCESS_AUTHORITY(500, "没有访问权限"),
    //登录相关,
    LOGIN_ERROR(10001, "用户名或密码错误"),
    NO_LOGIN_ERROR(10002, "暂未登录或登录已过期"),
    SIGNATURE_NOT_MATCH(10003, "请求的数字签名错误"),
//    LOGIN_PASSWORD_ERROR(10004, "用户名或密码错误"),
    INTERFACE_Disable(10005, "接口已被禁用，请联系系统管理员"),
    User_Disable(10006, "该用户已被禁用，请联系系统管理员"),
    USER_ALREADY_EXISTS(10007, "该用户已存在"),

    MISS_PARAM(10008, "缺少参数"),
    MQ_TOPIC_IS_EMPTY(10009, "TOPIC不可为空"),
    ERROR_TIF(10010, "您选择的影像文件已损坏"),
    ERROR_SHP(10011, "您选择的矢量文件已损坏"),
    ;


    /**
     * 错误码
     */
    private final Integer resultCode;

    /**
     * 错误描述
     */
    private final String resultMsg;

    CommonEnum(Integer resultCode, String resultMsg) {
        this.resultCode = resultCode;
        this.resultMsg = resultMsg;
    }


    @Override
    public Integer getResultCode() {
        return resultCode;
    }

    @Override
    public String getResultMsg() {
        return resultMsg;
    }
}
